<html>
<head>
<script type="text/javascript">
function getElementsCount()
{
  return document.getElementsByTagName("*").length;
}
</script>
</head>
<body>
<div id="a"></div>
<div id="b"></div>
<div id="c"></div>
</body>
</html>